package com.jiangnan.warehouse_management.dto.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.PositiveOrZero;
import lombok.Data;

@Data
public class ItemRequest {
    @NotBlank(message = "物品名称不能为空")
    private String itemName;

    @NotNull(message = "分类ID不能为空")
    @Positive(message = "分类ID必须大于0")
    private Integer categoryId;

    @NotBlank(message = "规格不能为空")
    private String specification;

    @NotBlank(message = "单位不能为空")
    private String unit;

    @NotNull(message = "最小库存不能为空")
    @PositiveOrZero(message = "最小库存不能小于0")
    private Integer minimumStock;

    @NotNull(message = "最大库存不能为空")
    @Positive(message = "最大库存必须大于0")
    private Integer maximumStock;
}